]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
[AppWell] Make control-click create a new window
authorColin Walters <walters@verbum.org>
Tue, 8 Sep 2009 21:29:22 +0000 (17:29 -0400)
committerColin Walters <walters@verbum.org>
Tue, 8 Sep 2009 22:48:51 +0000 (18:48 -0400)
Implement this for now by just re-launching the application, which
visually will normally create a new window.

http://bugzilla.gnome.org/show_bug.cgi?id=594565

js/ui/appDisplay.js

index 58948ff4cb40649a262646feef5a2bf586870c35..e806f61b8063740d19842d9fdd1c1cce5f9662d7 100644 (file)
@@ -735,7 +735,22 @@ RunningWellItem.prototype = {
 
         this.actor.connect('button-press-event', Lang.bind(this, this._onButtonPress));
         this.actor.connect('notify::hover', Lang.bind(this, this._onHoverChanged));
-        this.actor.connect('activate', Lang.bind(this, this.activateMostRecentWindow));
+        this.actor.connect('activate', Lang.bind(this, this._onActivate));
+    },
+
+    _onActivate: function (actor, event) {
+        let modifiers = event.get_state();
+
+        if (this._menuTimeoutId > 0) {
+            Mainloop.source_remove(this._menuTimeoutId);
+            this._menuTimeoutId = 0;
+        }
+
+        if (modifiers & Clutter.ModifierType.CONTROL_MASK) {
+            this.appInfo.launch();
+        } else {
+            this.activateMostRecentWindow();
+        }
     },
 
     activateMostRecentWindow: function () {